﻿{% extends "gma/base.html" %}
{% load static %}

<!-- CONTENT
  =====================================================================-->

{% block content %}

    <div class="page__hd">
        <h1 class="page__title"><i class="fa fa-boxes my-page-title-icon"> </i></h1>
        <p class="page__desc"> 房间品类管理 </p>
    </div>

    <div class="page__bd">
        <!-- 首页房间品类列表 -->
        <div class="weui-panel weui-panel_access">
            <div class="weui-panel__hd">首页房间品类列表</div>

            <div class="weui-panel__bd">
                <div class="weui-media-box weui-media-box_small-appmsg">
                    <div class="weui-cells">
                        <a v-for="tag in tags_in_homepage" class="weui-cell weui-cell_access weui-cell_example"
                           :href="tag.edit_url">
                            <div class="weui-cell__bd weui-cell_primary">
                                <p>[[ tag.orderno ]]. [[ tag.tag_name ]]</p>
                            </div>
                            <div class="weui-cell__ft">
                                <label class="weui-switch-cp">
                                    <input class="weui-switch-cp__input" v-model="tag.show_in_homepage" type="checkbox"
                                           @click="clickRoomTagShowInHomepage(tag)"/>
                                    <div class="weui-switch-cp__box"></div>
                                </label>
                            </div>
                        </a>
                    </div>
                </div>
            </div>

            <div class="weui-panel__ft">
                <a href="{% url 'gma:config_new_room_tag' %}" class="weui-cell weui-cell_access weui-cell_link">
                    <div class="weui-cell__bd"><i class="fa fa-plus-square"></i> 增加新的房间品类</div>
                    <span class="weui-cell__ft"></span>
                </a>
            </div>
        </div>

        <!-- 聊天室品类列表 -->
        <div class="weui-panel weui-panel_access">
            <div class="weui-panel__hd">聊天室房间品类列表</div>

            <div class="weui-panel__bd">
                <div class="weui-media-box weui-media-box_small-appmsg">
                    <div class="weui-cells">
                        <a v-for="tag in tags_in_chat_room_page" class="weui-cell weui-cell_access weui-cell_example"
                           :href="tag.edit_url">
                            <div class="weui-cell__bd weui-cell_primary">
                                <p>[[ tag.orderno ]]. [[ tag.tag_name ]]</p>
                            </div>
                            <div class="weui-cell__ft">
                                <label class="weui-switch-cp">
                                    <input class="weui-switch-cp__input" v-model="tag.show_in_chat_room_page"
                                           type="checkbox" @click="clickRoomTagShowInChatRoomPage(tag)"/>
                                    <div class="weui-switch-cp__box"></div>
                                </label>
                            </div>
                        </a>
                    </div>
                </div>
            </div>

            <div class="weui-panel__ft">
                <a href="{% url 'gma:config_new_room_tag' %}" class="weui-cell weui-cell_access weui-cell_link">
                    <div class="weui-cell__bd"><i class="fa fa-plus-square"></i> 增加新的房间品类</div>
                    <span class="weui-cell__ft"></span>
                </a>
            </div>
        </div>
    </div>

    <div class="page__ft">
        <a href="{% url 'gma:home' %}">
        <span class="bottom-logo">
           HiBao
       </span>
        </a>
    </div>

{% endblock content %}

<!-- SCRIPT
  =====================================================================-->

{% block extra_js %}

    <script> {% include 'gma/config/room/config_room_tag_list.vue' %} </script>

{% endblock extra_js %}